package com.tristia.entity;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "users"
})
@XmlRootElement
public class Users {

    @XmlElement(name="user", required = true)
    protected List<User> users;
    
    public Users() {
    }

    public Users(List<User> users) {
    	setUsers(users);
	}

    public List<User> getUsers() {
        if (users == null) {
        	users = new ArrayList<User>();
        }
        return this.users;
    }
    
	public void setUsers(List<User> users) {
		this.users = users;
	}

	@Override
	public String toString() {
		return (this.users != null) ? "{\"users\": " + this.users.toString() + "}" : "{users:[]}";
	}
}
